package net.wisos.opn.common.service;

import net.wisos.opn.common.dao.MemberDao;
import net.wisos.opn.common.entity.Member;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * 客户管理业务类.
 * 
 * @author calvin
 */
@Component
@Transactional(readOnly = true)
public class MemberManager {
	@Autowired
	private MemberDao memberDao;

	public Member getMember(Long id) {
		return memberDao.findOne(id);
	}

	@Transactional(readOnly = false)
	public void saveMember(Member member) {
		memberDao.save(member);
	}

	@Transactional(readOnly = false)
	public void deleteMember(Long id) {
		memberDao.delete(id);
	}

}
